<%--
    Document   : register
    Author     : Thomas, Mike
--%>
<%
    String status = "";
    if(session.getAttribute( "statusMessage" ) != null){
        status = (String) session.getAttribute( "statusMessage" );
        session.setAttribute( "statusMessage", null);
    }
    String statusL = "";
    if(session.getAttribute( "statusMessageL" ) != null){
        statusL = (String) session.getAttribute( "statusMessageL" );
    }
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ include file="header.jsp" %>

<!-- Content -->

<div id="container">
    <div id="content" role="main">
        <div id="post-0" class="post error404 not-found">
            <h1 class="entry-title">Register</h1>

            <div class="entry-content">
            <!-- Start check for registration status -->
                <% if(status.contains("successful")){ %>
                    <p>Welcome. <%= status %> Please login above!</p>
                <% } else if(statusL.contains("successful")){ %>
                    <p>You have already registered!</p>
                <% } else{ %>
                    <p>Please fill in the form and press submit to create an account.
                        Then login by entering your username and password in the boxes above!
                        Press reset to reset the form.</p>
                <p><form action="doregister.jsp" method=post>
                    <table>
                    <tr><td>Username</td><td colspan=2><input type="text" name="username" value="" size=25  maxlength=50></td></tr>
                    <tr><td>Real Name</td><td colspan=2><input type="text" name="realname" value="" size=25  maxlength=50></td></tr>
                    <tr><td>Email</td><td colspan=2><input type="text" name="email" value="" size=25  maxlength=125></td></tr>
                    <tr><td>Password</td><td colspan=2><input type="password" name="password" size=25 value="" maxlength=20></td></tr>
                    <tr><td>Confirm Password</td><td colspan=2><input type="password" name="passwordconfirm" size=25 value="" maxlength=20></td></tr>
                    <tr><td colspan=2></td><td><input type="submit" value="Submit"> <input type="reset"  value="Reset"></td></tr>
                    </table>
                </form></p>
                
                <%} %>
            </div><!-- .entry-content -->
   <!-- End check for registration status -->
        </div><!-- #post-0 -->

    </div><!-- #content -->
</div><!-- #container -->

<%@ include file="sidebar.jsp" %>

<!-- /Content -->

<%@ include file="footer.jsp" %>


